﻿
#include "SerialConfig.h"

SerialConfig::SerialConfig(const QString & port_name,
                           int baud,int data_bits,
                           int stop_bits,int parity)
{
    portName_ =  port_name;
    baud_ = baud;
    dataBits_ = data_bits;
    stopBits_ = stop_bits;
    parity_ = parity;
}

SerialConfig::SerialConfig(SerialConfig* copy)
{
    if(copy){
        this->portName_ = copy->portName_;
        this->baud_ = copy->baud_;
        this->dataBits_ = copy->dataBits_;
        this->stopBits_ = copy->stopBits_;
        this->parity_ = copy->parity_;
    }
}

SerialConfig::SerialConfig(const SerialConfig& copy)
{
    this->portName_ = copy.portName_;
    this->baud_ = copy.baud_;
    this->dataBits_ = copy.dataBits_;
    this->stopBits_ = copy.stopBits_;
    this->parity_ = copy.parity_;
}
